home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19980901-19981211 / 000144_news@newsmaster….columbia.edu _Tue Oct 13 19:33:31 1998.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA21463
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 13 Oct 1998 19:33:30 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id TAA10546
  7.     for kermit.misc@watsun; Tue, 13 Oct 1998 19:33:30 -0400 (EDT)
  8. Path: news.columbia.edu!panix!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!chippy.visi.com!news-out.visi.com!ptah.visi.com!visi.com!ekholm
  9. From: Mike Ekholm <ekholm@nospam.visi.com>
  10. Subject: Kermit script
  11. Newsgroups: comp.protocols.kermit.misc
  12. Organization: someplace that you are not at
  13. X-readme: why are you looking at my headers?
  14. X-snack: Try the new FOO.BAR. Now low fat!
  15. User-Agent: tin/pre-1.4-980514 (UNIX) (SunOS/5.6 (sun4u))
  16. Lines: 53
  17. Message-ID: <VqRU1.139$fE6.283188@ptah.visi.com>
  18. Date: Tue, 13 Oct 1998 23:33:09 GMT
  19. NNTP-Posting-Host: 209.98.98.8
  20. X-Complaints-To: abuse@visi.com
  21. X-Trace: ptah.visi.com 908321589 209.98.98.8 (Tue, 13 Oct 1998 18:33:09 CDT)
  22. NNTP-Posting-Date: Tue, 13 Oct 1998 18:33:09 CDT
  23. Xref: news.columbia.edu comp.protocols.kermit.misc:9335
  24.  
  25. Hello.
  26. I am attempting to write a simple script to sent the character "s" to the
  27. serial port, then recive the the output from the serial port. I have
  28. gotten the sending to work, but the recive part is not working. I have
  29. tried the "input" command with no luck. if I do the script interactivly,
  30. then do a "connect" I recive all the data I want, without doing anything
  31. further. but the connect command is not very fun to use when doing this
  32. non interactivly. What is the best way to have all the data recived from
  33. the serial port go to stdout then have the script/kermit terminate?
  34.  
  35. What I am doing is monitoring a old UPS, which sends the stats out, when
  36. it recives a "s" on the serial port. here is what I got from the
  37. interactive session:
  38.  
  39.    [/usr/home/ekholm] C-Kermit>set line /dev/cuaa0
  40.    [/usr/home/ekholm] C-Kermit> set speed 1200
  41.    /dev/cuaa0, 1200 bps
  42.    [/usr/home/ekholm] C-Kermit>output s\13
  43.    [/usr/home/ekholm] C-Kermit>output s\13     
  44.    [/usr/home/ekholm] C-Kermit>connect
  45.    => s
  46.    ---- MICRO-FERRUPS SYSTEM STATUS ----
  47.  
  48.    INVERTER:  OFF
  49.  
  50.    AC VOLTS OUT     121
  51.    AC AMPS OUT      3.76
  52.    OUTPUT LOAD (VA) 455
  53.    AC VOLTS IN      121
  54.    FREQUENCY        59.97
  55.    BATTERY VOLTS    13.5
  56.    HEATSINK (C)     032
  57.    # POWER OUTAGES  00090
  58.    INVERTER MINUTES 00170.2
  59.    SYSTEM HOURS     032345
  60.    # OVERLOADS      0080
  61.   PROJECTED BACKUP TIME AVAILABLE AT PRESENT LOAD:  0025  MINUTES
  62.    => 
  63.  
  64. So what I want to do is get everthing after the connect command, then have
  65. kermit terminate. I have tried the input command, but i can only get that
  66. to work like 'expect'
  67.  
  68. Thanks,
  69.  -Mike
  70.  
  71. -- 
  72.         ekholm@nospam.visi.com | http://www.visi.com/~ekholm | quake:Nalez
  73.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74.           nospam is valid, filter provided by my isp http://www.visi.com  
  75.             Check my all new home page at http://www.visi.com/~ekholm/
  76.               640K ought to be enough for anybody! - Bill Gates, 1981
  77.                    Unix is user-friendly, not beginner-friendly.